package com.yuqing.myblogServe.utils;

import org.springframework.stereotype.Component;

import java.util.Date;

/**
 * @author lyq
 * @date 2023/12/2
 **/
@Component
public class TimeUtil {
    /**
     * 获得当前时间的时间戳
     * @return 时间戳
     */
    public long getLongTime(){
        Date now = new Date();
        return now.getTime()/1000;
    }
}
